import request from '@/utils/request'
// 获取检测地点的
export function getCheckPlaceList(formData) {
  return request({
    url: '/appointment/getCheckPlaceList',
    method: 'post',
    headers: {
      'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8'
    },
    data: formData
  })
}
// 根据uuid查询检测点信息
export function getCheckPlaceByUuid(uuid) {
  return request({
    url: '/appointment/getCheckPlaceByUuid',
    method: 'get',
    params: { uuid }
  })
}
// 根据pcrs查询检测点信息
export function getcheckPlaceByPcrs(pcrs) {
  return request({
    url: '/appointment/getcheckPlaceByPcrs',
    method: 'get',
    params: pcrs
  })
}
// 更新一条检测地点信息
export function updateCheckPlace(formData) {
  return request({
    url: '/appointment/updateCheckPlace',
    method: 'post',
    headers: {
      'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8'
    },
    data: formData
  })
}

// 添加一条检测地点信息
export function addCheckPlace(formData) {
  return request({
    url: '/appointment/addCheckPlace',
    method: 'post',
    headers: {
      'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8'
    },
    data: formData //post的请求，要使用data而不能用params
  })
}
// 根据uuid删除一条检测点
export function delCheckPlace(uuid) {
  return request({
    url: '/appointment/delCheckPlace',
    method: 'get',
    params: { uuid }
  })
}

